#ifndef INPUT_BOX_H
#define INPUT_BOX_H

#include "../../../utils/data_types.h"
#include "../../Font/Font.h"
#include "../shapes/Rectangle.h"
#include "../../input/KeyboardEvents.h"

class InputBox : public Rectangle
{
    public:
        
        InputBox(const Point2D& position, uint32 background_color, SDL_Color font_color);
        
        void Render(SDL_Surface* surface);
        
        const string& GetText() const;
        
    private:
        
        SDL_Color _font_color;
        
        void WriteCharacter(char c);
        
        Functor<InputBox,char> _handle_char_press;
        
        string _current_text;
};

#endif
